import request from '@/utils/request'

export function geDeviceListApi(params) {
  return request({
    url: '/device/index',
    method: 'get',
    params
  })
}

// 下拉菜单列表
export function getCateAllApi() {
  return request({
    url: '/community',
    method: 'get'
  })
}

// 增加分类
export function addUserApi() {
  return request({
    url: '/device/index',
    method: 'post'
  })
}

// 点击修改回显
export function editUserApi(data) {
  return request({
    url: '/device/index/' + data.id,
    method: 'put',
    data
  })
}

// 获取行id
export function editDeviceId(id) {
  return request({
    url: '/device/index/' + id,
    method: 'get'
  })
}

// 删除
export function delDeviceApi(id) {
  return request({
    url: '/device/index/' + id,
    method: 'delete'
  })
}
